<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body {
            background-image: url(./img/backageImg_1.png);
        }
    </style>
</head>
<body>
<script>
    //获取m-n之间的随机数
    function getRandom(m, n) {
        return Math.floor(Math.random() * (n - m + 1) + m)
    }

    const random = getRandom(1, 5);
    //更换背景图片的地址
    document.body.style.backgroundImage=`url(./img/backageImg_${random}.png)` ;

</script>
</body>
</html>